package com.smartshopping.iu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.webkit.WebView;

public class NewsActivity extends Activity {

	private String url = "";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_news);
		createWebpage();
	}

	public void createWebpage()
	{
		try
		{	Intent intent = getIntent();
			Bundle extras = intent.getExtras();
			url = extras.getString("url");
			System.out.println("URL = " + url);
			WebView webView = (WebView)findViewById(R.id.news_webView);
			webView.loadData("yourCode Html to load on the webView " , "text/html" , "utf-8");
			webView.loadUrl(url);
		}catch (Exception e) {
		   System.out.println("Exc="+e);
		 }
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.news, menu);
		return true;
	}

}
